package com.duoketech.controller.eagle;


import com.alibaba.fastjson.JSONObject;
import com.jfinal.kit.HttpKit;
import org.junit.jupiter.api.Test;

import java.util.HashMap;
import java.util.Map;

public class EagleControllerTest {

    @Test
    public void EntityAddTest(){
        String url="http://yingyan.baidu.com/api/v3/entity/add";
        JSONObject object = new JSONObject();
        object.put("ak","pmCsPVfvZhxXVyyTcUODzMXUd9VjLrPk");
        object.put("service_id","206703");
        object.put("entity_name","胡承淞");
        object.put("entity_desc","子配送兄弟");
        object.put("city","乌鲁木齐");
        String data=object.toJSONString();
        Map<String,String> header = new HashMap<String,String>();
        header.put("content-type", "multipart/form-data;");
        String result = HttpKit.post(url,data,header);
        System.out.println(result);
    }
}